/**
 * @file ngtcpclient.h
 * @author Suk Robert Koh (srkoh87z@gmail.com)
 *
 * @brief Type of client which uses TCP connection for communication
 */

#ifndef NGTCPCLIENT_H_
#define NGTCPCLIENT_H_

#ifndef _WIN32
#include <netdb.h>
#include <fcntl.h>
#endif
#include "ngclient.h"

/**
 * @class	NGTcpClient	Type of client which uses TCP connection for communication
 */
class NGTcpClient : public NGClient
{
public:
	NGTcpClient(const char *address, int port);
	virtual ~NGTcpClient();

	BOOL handleRecv(void);
	BOOL handleSend(void);

protected:
	BOOL setUpNetwork(const char *address, int port);
	BOOL tearDownNetwork(void);

#ifndef WIN32
	static void *recvThread(void *arg);
	static void *sendThread(void *arg);
#endif


};

#endif /* NGTCPCLIENT_H_ */
